home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / tracker-4.13.lha / tracker / prefs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-15  |  1.4 KB  |  83 lines

  1. /* prefs.c 
  2.     vi:ts=3 sw=3:
  3.  */
  4. /* $Id: prefs.c,v 4.7 1995/02/08 13:14:56 espie Exp $
  5.  * $Log: prefs.c,v $
  6.  * Revision 4.7  1995/02/08  13:14:56  espie
  7.  * *** empty log message ***
  8.  *
  9.  * Revision 4.7  1995/02/08  13:14:56  espie
  10.  * *** empty log message ***
  11.  *
  12.  * Revision 4.6  1995/02/01  20:41:45  espie
  13.  * Added color.
  14.  *
  15.  * Revision 4.6  1995/02/01  20:41:45  espie
  16.  * Added color.
  17.  *
  18.  * Revision 4.5  1995/02/01  16:39:04  espie
  19.  * *** empty log message ***
  20.  *
  21.  * Revision 4.5  1995/02/01  16:39:04  espie
  22.  * *** empty log message ***
  23.  *
  24.  */
  25.  
  26. #include "defs.h"
  27. #include "extern.h"
  28. #include "prefs.h"
  29. #include "tags.h"
  30.  
  31. ID("$Id: prefs.c,v 4.7 1995/02/08 13:14:56 espie Exp $")
  32. LOCAL void init_prefs P((void));
  33.  
  34. LOCAL void (*INIT)P((void)) = init_prefs;
  35.  
  36. LOCAL struct tag preferences[NUMBER_PREFS];
  37.  
  38. LOCAL void init_prefs()
  39.    {
  40.    int i;
  41.    
  42.    for (i = 0; i < NUMBER_PREFS; i++)
  43.       preferences[i].type = BASE_PREFS + i;
  44.    }
  45.  
  46. VALUE get_pref(index)
  47. int index;
  48.    {
  49.    INIT_ONCE;
  50.  
  51.    return preferences[index-BASE_PREFS].data;
  52.    }
  53.  
  54. void set_pref(index, value)
  55. int index;
  56. VALUE value;
  57.    {
  58.    preferences[index-BASE_PREFS].data = value;
  59.    }
  60.  
  61. void set_pref_scalar(index, value)
  62. int index;
  63. int value;
  64.    {
  65.    VALUE temp;
  66.    
  67.    temp.scalar = value;
  68.    set_pref(index, temp);
  69.    }
  70.  
  71. int get_pref_scalar(index)
  72. int index;
  73.    {
  74.    return get_pref(index).scalar;
  75.    }
  76.  
  77. struct tag *get_prefs()
  78.    {
  79.    INIT_ONCE;
  80.  
  81.    return preferences;
  82.    }
  83.